package com.freshmarket.freshmarket.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.freshmarket.freshmarket.entity.ProductType;
import com.freshmarket.freshmarket.service.impl.ProductTypeServiceImpl;
import com.freshmarket.freshmarket.utils.Result;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-04
 */
@RestController
@RequestMapping("/freshmarket/product-type")
public class ProductTypeController {
    final ProductTypeServiceImpl productTypeService;

    public ProductTypeController(ProductTypeServiceImpl productTypeService) {
        this.productTypeService = productTypeService;
    }

    @RequestMapping("getList")
    public Result getList(){
        List<ProductType> list = productTypeService.getList();
        return Result.successResult(list);
    }
}

